<template>
  <div>
    <section>
      <!--工具条-->
      <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
      </el-col>

      <!--列表-->
      <template>
        <el-table :data="permissionList" highlight-current-row style="width: 100%;">


          <el-table-column prop="name" label="权限名称" >
          </el-table-column>

          <el-table-column prop="sn" label="sn" >
          </el-table-column>
          <el-table-column prop="parentName" label="父权限" >
          </el-table-column>
          <el-table-column prop="url" label="URL" >
          </el-table-column>
        </el-table>
      </template>
    </section>
  </div>
</template>

<script>
import axios from "axios";

export default {
  name: "permission",
  data(){
    return {
      permissionList:[],
    }
  },
  mounted() {
    axios.get('http://localhost:8080/api/permission/findAll').then(resp=>{
      if (resp.data.code==200) {
        this.$message({
          message:resp.data.msg,
          type:'success'
        })
        this.permissionList=resp.data.data;
      }
      else this.$message({
        message:resp.data.msg,
        type:'error'
      })
    })
  }
}
</script>

<style scoped>

</style>